import { Switch, Route } from "react-router-dom";
import AddCategory from "./admin/AddCategory";
import AddProduct from "./admin/AddProduct";
import AdminDashbaord from "./admin/AdminDashbaord";
import Order from "./admin/Order";
import PrivateAdmin from "./admin/PrivateAdmin";
import PrivateUser from "./admin/PrivateUser";
import UserDashbaord from "./admin/UserDashbaord";
import Cart from "./core/Cart";
import Home from "./core/Home";
import Product from "./core/Product";
import Shop from './core/Shop'
import Signin from "./core/Signin";
import Signup from "./core/Signup";
function Routes () {
    return (
        <Switch>
            <Route path="/" component={Home} exact></Route>
            <Route path="/shop" component={Shop}></Route>
            <Route path="/signup" component={Signup}></Route>
            <Route path="/signin" component={Signin}></Route>
            <Route path="/cart" component={Cart}></Route>
            <PrivateUser path="/user/dashboard" component={UserDashbaord}></PrivateUser>
            <PrivateAdmin path="/admin/dashboard" component={AdminDashbaord}></PrivateAdmin>
            <PrivateAdmin path="/admin/order" component={Order}></PrivateAdmin>
            <PrivateAdmin path="/create/category" component={AddCategory}></PrivateAdmin>
            <PrivateAdmin path="/create/product" component={AddProduct}></PrivateAdmin>
            <Route path="/product/:productId" component={Product}></Route>
        </Switch>
    )
}
export default Routes
